package com.bocim.course.dao;

import com.bocim.course.meta.Orders;
import com.bocim.course.meta.Product;
import com.bocim.course.meta.ProductList;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import java.util.List;

import static com.sun.tools.doclets.formats.html.markup.HtmlStyle.summary;

/**
 * Created by liujunchen on 2016/11/8.
 */
@Repository
public interface Productdao {
    public List<Product>  selectProductsbyUsers(@Param("publishUserId") int publishUserId)  ;
    public   Product  selectProductbyId (@Param("productId") int productId , @Param("userId") int userId )  ;
    public ProductList selectProductListbyUserId(@Param("userId") int userId );
    public int    insertProduct( Product product )  ;
    //更新对应的产品信息
    public  int  updateProduct(Product product )  ;
    //删除对应商品
    public  int   deleteProduct(int id  ) ;
    //增加订单
    public  int   addOrder(Orders   order ) ;
    //更新产品购买状态
    public  int   updateProductStatus(@Param("productId") int  productId , @Param("status") int  status  ) ;

}
